package com.uzai.common.enums;

/**
 * 用户性别
 * @Auther: liuqi
 * @Date: 2021/8/14 16:45
 * @Description:
 */
public enum TokenTypeEnum {
    TB(0,"淘宝"),
    JD(1,"京东"),
    PDD(2,"拼多多"),
    VPH(3,"唯品会"),
    TLB_MT(4,"推老板-美团"),
    TLB_PDD(5,"推老板-拼多多"),
    ELM(6,"饿了么"),
    DY(7,"抖音"),
    TLB_DY(8,"推老板-抖音"),
    TLB_ELM(9,"推老板-饿了么"),
    KS(10,"快手"),
    TLB_KS(11,"推老板-快手"),
    TLB_JD(12,"推老板-京东"),
    TLB_VPH(13,"推老板-唯品会");

    private Integer id;
    private String desc;

    public static final int TB_VALUE = 0;
    public static final int JD_VALUE = 1;
    public static final int PDD_VALUE = 2;
    public static final int VPH_VALUE = 3;
    public static final int TLB_MT_VALUE = 4;
    public static final int TLB_PDD_VALUE = 5;
    public static final int ELM_VALUE = 6;
    public static final int DY_VALUE = 7;
    public static final int TLB_DY_VALUE = 8;
    public static final int TLB_ELM_VALUE = 9;

    public static final int KS_VALUE = 10;
    public static final int TLB_KS_VALUE = 11;
    public static final int TLB_JD_VALUE = 12;
    public static final int TLB_VPH_VALUE = 13;

    TokenTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static TokenTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (TokenTypeEnum type: TokenTypeEnum.values()) {
            if (type.getId().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
